extends Area2D

var is_moving : bool = false

func _draw() -> void:
	draw_circle(Vector2.ZERO, 30, Color.WHITE)

func move(new_position: Vector2) -> void:
	is_moving = true
	var tween = get_tree().create_tween()
	tween.tween_property(self, "position", new_position, 1)
	await tween.finished
	is_moving = false

func _on_area_entered(fish: Area2D) -> void:
	fish.animation.play("Collected")
	await fish.animation.animation_finished
	if fish is DiseasedFish:
		Globals.diseased_fish_collected.emit()
	else:
		Globals.normal_fish_collected.emit()
